import { defineStore } from "pinia";

export const useRoleStore = defineStore("useRole", {
  state: () => ({
    role:'student',
    menuList:[]
  }),
  getters: {
    getRole(state: any) {
      return state.role;
    },
    getMenuList(state: any) {
      return state.menuList;
    },
  },
  actions: {
    setRole(type: string) {
      this.role = type;
    },
    setMenuList(list: any) {
      this.menuList = list;
    },
  },
});
